<!--
host = window.location.hostname;
url = window.location.href;

if(host == "android-recovery.net")
{
	var newUrl = url.replace(/android-recovery.net/g,"www.android-recovery.net");
	location.href = newUrl;
}



$(function(){

	/*$(".down").click(function(){
		var pid=$(this).attr("pid");
		var timeStamp=  new Date().getTime();
		$.post('/index.php/Index/tongji',{'id':pid ,'ti':timeStamp},function(){

		});

	});
	*/
	$("#SearchScoping").toggle(function(){
		$("#dropNavSearch").css({border:"2px solid #d2d2d2",height:"85px"});
		$("#dropNavSearch").children('li').css({margin:"5px 0"});
		return false;
	},function(){
		$("#dropNavSearch").css({height:"0",border:"0"});
	
		return false;
	});
	
	$('#dropNavSearch').children('li').hover(function(){
				$(this).css({background:"#505050"});
				$(this).children('a').css({color:"#fff"});
				$(this).siblings().children('a').css({color:"#000"});
				$(this).siblings().css({background:"#fff"});
			}
			);
	
	$('.forumSelect').click(function(){
		var v=$(this).html();
		$("#SearchTerm").val(v);
	});
	
	
	$('#SearchTerm').click(function(){
		if($(this).val()=="Search..."){
		$(this).val('').css({color:"#000"});
		}
	});
	
	$('.im').mouseover(function(){
		$(this).find('img').eq(0).hide().siblings().show();
	}).mouseout(function(){
		$(this).find('img').eq(1).hide().siblings().show();
	})
	
	
	$('.apl').mouseover(function(){
		$(this).children().show();
	}).mouseout(function(){
		$(this).children('.col').hide();
	})

	$('.toggle').mouseover(function(){
		$(this).children('ul').show();
	}).mouseout(function(){
		$(this).children('ul').hide();
	});
	$('.addbg').mouseover(function(){
		$(this).addClass('new');
	}).mouseout(function(){
		$(this).removeClass('new');
	});
	$('#plist').hover(function(){
		$(this).contents('div').show();
	},function(){
		$(this).contents('div').hide();
	})
	$('.duoLink').mouseover(function(){
		$(this).children('div.down_box').show();
	}).mouseout(function(){
		$(this).children('div.down_box').hide();
	});

	$.countdownloadnum = function(id){
		var url = '/index.php/Index/downloadNum';
		if(isNaN(id)){
			//return false;
		}
		$.post(url,{'id':id},function(data){
			/*if(data == 1){
				$.Show_Tooltip('修改成功');
			}else{
				$.Show_Tooltip('修改失败');
			}*/
		});
	}

});

function down(pid,url){
	$.post('/index.php/Index/tongji',{'id':pid},function(){
		lo(url);

	});
}


function lo(url){

window.open(url,'_self');
}

function buy(pid){

	$.post('/index.php/Index/buytongji',{'id':pid},function(){

	});
}
(function($){

	$.fn.myScroll = function(options){
	//默认配置
	var defaults = {
		speed:60,  //滚动速度,值越大速度越慢
		rowHeight:24 //每行的高度
	};
	
	var opts = $.extend({}, defaults, options),intId = [];
	
	function marquee(obj, step){
	
		obj.find("ul").animate({
			marginTop: '-=1'
		},0,function(){
				var s = Math.abs(parseInt($(this).css("margin-top")));
				if(s >= step){
					$(this).find("li").slice(0, 1).appendTo($(this));
					$(this).css("margin-top", 0);
				}
			});
		}
		
		this.each(function(i){
			var sh = opts["rowHeight"],speed = opts["speed"],_this = $(this);
			intId[i] = setInterval(function(){
				if(_this.find("ul").height()<=_this.height()){
					clearInterval(intId[i]);
				}else{
					marquee(_this, sh);
				}
			}, speed);

			_this.hover(function(){
				clearInterval(intId[i]);
			},function(){
				intId[i] = setInterval(function(){
					if(_this.find("ul").height()<=_this.height()){
						clearInterval(intId[i]);
					}else{
						marquee(_this, sh);
					}
				}, speed);
			});
		
		});

	}

})(jQuery);

$(function(){

	$("").myScroll({
		speed:80,
		rowHeight:38
	});
	
});
-->